package test1224;

public class Test17 {
    public static void m17(int[] arr, int[] brr) {
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < brr.length; j++){
                if (arr[i] == brr[j]){
                    System.out.println(arr[i]);
                }
            }
        }
    }
    public static void main(String[] args) {
        // 根据方法的调用需求实现方法
        // 打印2个数组的交集(都有的元素)
        int[] arr = {1,2,3,4,5};
        int[] brr = {3,4,5,6,7};
        m17(arr, brr);
    }
}